package top.xxyu.quartz.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.xxyu.quartz.dao.AppQuartzDao;
import top.xxyu.quartz.entity.AppQuartz;

@Service
public class AppQuartzService {

    @Autowired
    private AppQuartzDao appQuartzDao;

    public void insertAppQuartzSer(AppQuartz appQuartz) {
        appQuartzDao.save(appQuartz);
    }

    public AppQuartz selectAppQuartzByIdSer(Integer quartzId) {
        return appQuartzDao.getOne(quartzId);
    }

    public void deleteAppQuartzByIdSer(Integer quartzId) {
        appQuartzDao.deleteById(quartzId);
    }

    public void updateAppQuartzSer(AppQuartz appQuartz) {
        appQuartzDao.saveAndFlush(appQuartz);
    }
}
